package com.zhy.generator.commons.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 *   返回结果
 *  @author dadi  litu@51xianqu.net
 *  @date 18/11/11  
 */
@Data
@ToString
@ApiModel
@NoArgsConstructor
public class ResultResponse<T> implements Serializable {
    private static final long serialVersionUID = -172911448358060648L;

    @ApiModelProperty(value = "接口请求id")
    private Long requestId = System.currentTimeMillis();

    @ApiModelProperty(value = "状态码")
    private Integer errcode;

    @ApiModelProperty(value = "消息")
    private String msg;

    @ApiModelProperty(value = "总条数")
    private Long total;

    @ApiModelProperty(value = "是否有下一页")
    private boolean hasNext;

    @ApiModelProperty(value = "页数")
    private Integer pageIndex;

    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    @ApiModelProperty(value = "业务数据")
    private T data;
}
